//
//  MenuCell.m
//  TrainTree
//
//  Created by wanghui on 2017/9/10.
//  Copyright © 2017年 YouYeShu. All rights reserved.
//

#import "MenuCell.h"

@implementation MenuCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setHasLowerLevel:(NSString *)hasLowerLevel
{
    if ([hasLowerLevel isEqualToString:@"0"]) {
        self.teamHeightConstraint.constant = 0;
    }else{
        self.teamHeightConstraint.constant = 41;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)teamClick:(id)sender {
    if (_delegate && [_delegate respondsToSelector:@selector(teamPage:)]) {
        [_delegate teamPage:MenuTypeTeam];
    }
}
- (IBAction)powerClick:(id)sender {
    if (_delegate && [_delegate respondsToSelector:@selector(teamPage:)]) {
        [_delegate teamPage:MenuTypePower];
    }
}
- (IBAction)recordClick:(id)sender {
    if (_delegate && [_delegate respondsToSelector:@selector(teamPage:)]) {
        [_delegate teamPage:MenuTypeRecord];
    }
}
- (IBAction)settingClick:(id)sender {
    if (_delegate && [_delegate respondsToSelector:@selector(teamPage:)]) {
        [_delegate teamPage:MenuTypeSetting];
    }
}

@end
